#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtCore>
#include <QtGui>
#include <QtWebKit>
#include <QtDeclarative>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    Q_INVOKABLE void log(QString input);
    Q_INVOKABLE void poi_result_in(QVariantMap input);
    Q_INVOKABLE void bus_navi_result_in(QVariantMap input);
    Q_INVOKABLE void bus_sta_result_in(QVariantMap input);
    Q_INVOKABLE void bus_line_result_in(QVariantMap input);
    Q_INVOKABLE void car_navi_result_in(QVariantMap input);
    Q_INVOKABLE void set_start_poi(QString poi);
    Q_INVOKABLE void set_end_poi(QString poi);
    Q_INVOKABLE void set_city_code(QString code);
    Q_INVOKABLE void set_map_xyz(QString poi_x, QString poi_y, QString poi_zoom);
    
public slots:
    void set_html_city(QString city);
    void search_poi(QString keyword);
    void bus_navi(QString start_x,QString start_y,QString end_x,QString end_y, QString citycode);
    void bus_station(QString keyword, QString citycode);
    void bus_line(QString busline_id, QString bus_city);
    void car_navi(QString start_x,QString start_y,QString end_x,QString end_y,QString drive_type);
    void show_status(QString color, QString status);
    void draw_bus_change_line(QString num);
    void draw_bus_line_station(QString px, QString py, QString serialid, QString pn, QString linename);
    void map_pan_to(QString poi_x, QString poi_y);
    void show_message(QString title, QString content);

signals:
    void map_load_finish();
    void search_result(QVariantMap result);
    void bus_navi_result(QVariantMap result);
    void bus_sta_result(QVariantMap result);
    void bus_line_result(QVariantMap result);
    void car_navi_result(QVariantMap result);
    void poi_start(QString poi);
    void poi_end(QString poi);
    void city_code(QString code);
    void send_status(QString color, QString status);

private:
    Ui::MainWindow *ui;

    QWebPage *mainpage;
    QWebFrame *mainframe;

    QSettings setting;
    QString curr_pos_x;
    QString curr_pos_y;
    QString curr_pos_zoom;
    QString curr_city;

private slots:
    void html_load_finish();
    void on_action_2_triggered();
    void on_action_3_triggered();
    void on_action_386_triggered();
    void on_action_AesyPig_triggered();
    void on_action_QT_triggered();
    void on_action_4_triggered();
    void on_action_5_triggered();
    void on_action_6_triggered();
    void on_action_7_triggered();
    void on_action_8_triggered();
    void on_action_9_triggered();
    void on_action_10_triggered();
    void on_action_11_triggered();
    void on_action_53_triggered();
    void on_action_54_triggered();
    void on_action_55_triggered();
    void on_action_56_triggered();
    void on_action_57_triggered();
    void on_action_58_triggered();
    void on_action_59_triggered();
    void on_action_60_triggered();
    void on_action_61_triggered();
    void on_action_62_triggered();
    void on_action_63_triggered();
    void on_action_64_triggered();
    void on_action_65_triggered();
    void on_action_66_triggered();
    void on_action_67_triggered();
    void on_action_68_triggered();
    void on_action_69_triggered();
    void on_action_70_triggered();
    void on_action_71_triggered();
    void on_action_72_triggered();
    void on_action_73_triggered();
    void on_action_74_triggered();
    void on_action_75_triggered();
    void on_action_76_triggered();
    void on_action_77_triggered();
    void on_action_78_triggered();
    void on_action_79_triggered();
    void on_action_80_triggered();
    void on_action_81_triggered();
    void on_action_82_triggered();
    void on_action_83_triggered();
    void on_action_84_triggered();
    void on_action_85_triggered();
    void on_action_86_triggered();
    void on_action_87_triggered();
    void on_action_88_triggered();
    void on_action_89_triggered();
    void on_action_90_triggered();
    void on_action_91_triggered();
    void on_action_92_triggered();
    void on_action_93_triggered();
    void on_action_94_triggered();
    void on_action_95_triggered();
    void on_action_96_triggered();
    void on_action_97_triggered();
    void on_action_98_triggered();
    void on_action_99_triggered();
    void on_action_100_triggered();
    void on_action_101_triggered();
    void on_action_102_triggered();
    void on_action_103_triggered();
    void on_action_104_triggered();
    void on_action_105_triggered();
    void on_action_106_triggered();
    void on_action_107_triggered();
    void on_action_108_triggered();
    void on_action_109_triggered();
    void on_action_110_triggered();
    void on_action_111_triggered();
    void on_action_112_triggered();
    void on_action_113_triggered();
    void on_action_114_triggered();
    void on_action_115_triggered();
    void on_action_116_triggered();
    void on_action_117_triggered();
    void on_action_118_triggered();
    void on_action_119_triggered();
    void on_action_120_triggered();
    void on_action_121_triggered();
    void on_action_122_triggered();
    void on_action_123_triggered();
    void on_action_124_triggered();
    void on_action_125_triggered();
    void on_action_126_triggered();
    void on_action_127_triggered();
    void on_action_128_triggered();
    void on_action_129_triggered();
    void on_action_130_triggered();
    void on_action_131_triggered();
    void on_action_132_triggered();
    void on_action_133_triggered();
    void on_action_134_triggered();
    void on_action_135_triggered();
    void on_action_136_triggered();
    void on_action_137_triggered();
    void on_action_138_triggered();
    void on_action_139_triggered();
    void on_action_140_triggered();
    void on_action_141_triggered();
    void on_action_142_triggered();
    void on_action_143_triggered();
    void on_action_144_triggered();
    void on_action_145_triggered();
    void on_action_146_triggered();
    void on_action_147_triggered();
    void on_action_148_triggered();
    void on_action_149_triggered();
    void on_action_150_triggered();
    void on_action_151_triggered();
    void on_action_152_triggered();
    void on_action_153_triggered();
    void on_action_154_triggered();
    void on_action_155_triggered();
    void on_action_156_triggered();
    void on_action_157_triggered();
    void on_action_158_triggered();
    void on_action_159_triggered();
    void on_action_160_triggered();
    void on_action_161_triggered();
    void on_action_162_triggered();
    void on_action_163_triggered();
    void on_action_164_triggered();
    void on_action_165_triggered();
    void on_action_166_triggered();
    void on_action_167_triggered();
    void on_action_168_triggered();
    void on_action_169_triggered();
    void on_action_170_triggered();
    void on_action_171_triggered();
    void on_action_172_triggered();
    void on_action_173_triggered();
    void on_action_174_triggered();
    void on_action_175_triggered();
    void on_action_176_triggered();
    void on_action_177_triggered();
    void on_action_178_triggered();
    void on_action_179_triggered();
    void on_action_180_triggered();
    void on_action_181_triggered();
    void on_action_182_triggered();
    void on_action_183_triggered();
    void on_action_184_triggered();
    void on_action_185_triggered();
    void on_action_186_triggered();
    void on_action_187_triggered();
    void on_action_188_triggered();
    void on_action_189_triggered();
    void on_action_190_triggered();
    void on_action_191_triggered();
    void on_action_192_triggered();
    void on_action_193_triggered();
    void on_action_194_triggered();
    void on_action_195_triggered();
    void on_action_196_triggered();
    void on_action_197_triggered();
    void on_action_198_triggered();
    void on_action_199_triggered();
    void on_action_200_triggered();
    void on_action_201_triggered();
    void on_action_202_triggered();
    void on_action_203_triggered();
    void on_action_204_triggered();
    void on_action_205_triggered();
    void on_action_206_triggered();
    void on_action_207_triggered();
    void on_action_208_triggered();
    void on_action_209_triggered();
    void on_action_210_triggered();
    void on_action_211_triggered();
    void on_action_212_triggered();
    void on_action_213_triggered();
    void on_action_214_triggered();
    void on_action_215_triggered();
    void on_action_216_triggered();
    void on_action_217_triggered();
    void on_action_218_triggered();
    void on_action_219_triggered();
    void on_action_220_triggered();
    void on_action_221_triggered();
    void on_action_222_triggered();
    void on_action_223_triggered();
    void on_action_224_triggered();
    void on_action_225_triggered();
    void on_action_226_triggered();
    void on_action_227_triggered();
    void on_action_228_triggered();
    void on_action_229_triggered();
    void on_action_230_triggered();
    void on_action_231_triggered();
    void on_action_232_triggered();
    void on_action_233_triggered();
    void on_action_234_triggered();
    void on_action_235_triggered();
    void on_action_236_triggered();
    void on_action_237_triggered();
    void on_action_238_triggered();
    void on_action_239_triggered();
    void on_action_240_triggered();
    void on_action_241_triggered();
    void on_action_242_triggered();
    void on_action_243_triggered();
    void on_action_244_triggered();
    void on_action_245_triggered();
    void on_action_246_triggered();
    void on_action_247_triggered();
    void on_action_248_triggered();
    void on_action_249_triggered();
    void on_action_250_triggered();
    void on_action_251_triggered();
    void on_action_252_triggered();
    void on_action_253_triggered();
    void on_action_254_triggered();
    void on_action_255_triggered();
    void on_action_256_triggered();
    void on_action_257_triggered();
    void on_action_258_triggered();
    void on_action_259_triggered();
    void on_action_260_triggered();
    void on_action_261_triggered();
    void on_action_262_triggered();
    void on_action_263_triggered();
    void on_action_264_triggered();
    void on_action_265_triggered();
    void on_action_266_triggered();
    void on_action_267_triggered();
    void on_action_268_triggered();
    void on_action_269_triggered();
    void on_action_270_triggered();
    void on_action_271_triggered();
    void on_action_272_triggered();
    void on_action_273_triggered();
    void on_action_274_triggered();
    void on_action_275_triggered();
    void on_action_276_triggered();
    void on_action_277_triggered();
    void on_action_278_triggered();
    void on_action_279_triggered();
    void on_action_280_triggered();
    void on_action_281_triggered();
    void on_action_282_triggered();
    void on_action_283_triggered();
    void on_action_284_triggered();
    void on_action_285_triggered();
    void on_action_286_triggered();
    void on_action_287_triggered();
    void on_action_288_triggered();
    void on_action_289_triggered();
    void on_action_290_triggered();
    void on_action_291_triggered();
    void on_action_292_triggered();
    void on_action_293_triggered();
    void on_action_294_triggered();
    void on_action_295_triggered();
    void on_action_296_triggered();
    void on_action_297_triggered();
    void on_action_298_triggered();
    void on_action_299_triggered();
    void on_action_300_triggered();
    void on_action_301_triggered();
    void on_action_302_triggered();
    void on_action_303_triggered();
    void on_action_304_triggered();
    void on_action_305_triggered();
    void on_action_306_triggered();
    void on_action_307_triggered();
    void on_action_308_triggered();
    void on_action_309_triggered();
    void on_action_310_triggered();
    void on_action_311_triggered();
    void on_action_312_triggered();
    void on_action_313_triggered();
    void on_action_314_triggered();
    void on_action_315_triggered();
    void on_action_316_triggered();
    void on_action_317_triggered();
    void on_action_318_triggered();
    void on_action_319_triggered();
    void on_action_320_triggered();
    void on_action_321_triggered();
    void on_action_322_triggered();
    void on_action_323_triggered();
    void on_action_324_triggered();
    void on_action_325_triggered();
    void on_action_326_triggered();
    void on_action_327_triggered();
    void on_action_328_triggered();
    void on_action_329_triggered();
    void on_action_330_triggered();
    void on_action_331_triggered();
    void on_action_332_triggered();
    void on_action_333_triggered();
    void on_action_334_triggered();
    void on_action_335_triggered();
    void on_action_336_triggered();
    void on_action_337_triggered();
    void on_action_338_triggered();
    void on_action_339_triggered();
    void on_action_340_triggered();
    void on_action_341_triggered();
    void on_action_342_triggered();
    void on_action_343_triggered();
    void on_action_344_triggered();
    void on_action_345_triggered();
    void on_action_346_triggered();
    void on_action_347_triggered();
    void on_action_348_triggered();
    void on_action_349_triggered();
    void on_action_350_triggered();
    void on_action_351_triggered();
    void on_action_352_triggered();
    void on_action_353_triggered();
    void on_action_354_triggered();
    void on_action_355_triggered();
    void on_action_356_triggered();
    void on_action_357_triggered();
    void on_action_358_triggered();
    void on_action_359_triggered();
    void on_action_360_triggered();
    void on_action_361_triggered();
    void on_action_362_triggered();
    void on_action_363_triggered();
    void on_action_364_triggered();
    void on_action_365_triggered();
    void on_action_366_triggered();
    void on_action_367_triggered();
    void on_action_368_triggered();
    void on_action_369_triggered();
    void on_action_370_triggered();
    void on_action_371_triggered();
    void on_action_372_triggered();
    void on_action_373_triggered();
    void on_action_374_triggered();
    void on_action_375_triggered();
    void on_action_376_triggered();
    void on_action_377_triggered();
    void on_action_378_triggered();
    void on_action_379_triggered();
    void on_action_380_triggered();
    void on_action_381_triggered();
    void on_action_383_triggered();
    void on_action_384_triggered();
    void on_action_385_triggered();
    void on_action_387_triggered();
    void on_action_388_triggered();
    void on_action_389_triggered();
    void on_action_390_triggered();
    void on_action_391_triggered();
    void on_action_392_triggered();
    void on_action_393_triggered();
    void on_action_394_triggered();
    void on_action_395_triggered();
    void on_action_396_triggered();
    void on_action_397_triggered();
    void on_action_398_triggered();
    void on_action_399_triggered();
    void on_action_400_triggered();
    void on_action_401_triggered();
    void on_action_402_triggered();
    void on_action_403_triggered();
    void on_action_404_triggered();
    void on_action_405_triggered();
    void on_action_406_triggered();
    void on_action_407_triggered();
    void on_action_408_triggered();
    void on_action_409_triggered();
    void on_action_clearmap_triggered();
    void on_action_resetmap_triggered();
};

#endif // MAINWINDOW_H
